<!doctype html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>TvLibs</title>
    <style>
        body{
            background-color: #666666;
        }
    </style>
    <script type="text/javascript" lang="javascript" src="./AppBridge.js"></script>
    <script type="text/javascript">
        TVBridge.register("nativeTest", function(data){
            TVBridge.call({
                status: 1,
                msg: 'OK',
                id: data.callbackId,
                data: {
                    name: 'John',
                    age: 22
                }
            });
        });
        function btnTest() {
            TVBridge.call({}, function(result){
                alert("收到Native返回" + JSON.stringify(result));
            }, 'test');
        }
    </script>
</head>
<body>
    <h5>JS测试调用</h5>
    <hr />
    <input type="button" value="测试" onclick="javascript:btnTest();" />
</body>
</html>